package netty;

import netty.service.IUserService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class SpringBootNettyClientApplication
{
	public static void main(String[] args)
	{
		//测试远程调用
		ConfigurableApplicationContext context = SpringApplication.run(SpringBootNettyClientApplication.class, args);
		final IUserService bean = context.getBean(IUserService.class);
		for (int i = 0; i < 100; i++)
		{
			int sum = bean.sum(1, i);
			System.out.println(sum);
		}
		context.close();
	}
}
